import http from '@/utils/http'

export function getArt() {
  return http({
    url: '/posts',
    method: 'GET'
  })
}
export function issuArt(title: string, content: string, status: string) {
  return http({
    url: '/posts',
    method: 'POST',
    data: {
      title,
      content,
      status
    }
  })
}
export function changeArt(id: any, title: string, content: string, status: string) {
  return http({
    url: '/posts/' + id,
    method: 'PATCH',
    data: {
      title,
      content,
      status
    }
  })
}
export function deleteArt(id: any) {
  return http({
    url: '/posts/' + id,
    method: 'DELETE'
  })
}
